{{template "header"}}

    
    <div id="main" class="container" ng-controller="TodoCtrl">
	
	<div class="row-fluid page-header">
	<h2>我的日程</h2>
	</div>
       <div  class="row-fluid">
         <!--可以录入内容的部分-->
          <form class="form-inline" role="form" ng-submit="addTodo()">
            <div class="form-group">    
				<label class="sr-only" for="starttime">时间</label>    
				<input type="text" data-provide="datepicker" ng-model="Starttime" class="form-control" id="starttime" name="starttime" placeholder="时间" data-date-format="yyyy-mm-dd">  
			</div>
			<div class="form-group">    
				<label class="sr-only" for="title">任务</label>    
				<input type="text" ng-model="Title" size="50" class="form-control form-control-static" id="title" name="title"   placeholder="任务">  
			</div>
            <div class="form-group">    
				<label class="sr-only" for="level">级别</label>    
				<select ng-model="Level" id="level" name="level" class="form-control">
					<option value='0'>一般</option>
					<option value='1'>重要</option>
					<option value='2'>紧急</option>
				</select>
			</div>
			<button type="submit" class="btn btn-primary">
				<span class="glyphicon glyphicon-star"></span>增加
			</button>
                

        </form>
       </div>
	 <!--今天有哪些要做的事-->
      <div id="today-todo" class="row-fluid" style="margin-top:50px;">
		<div class="todo-show-header">&nbsp;&nbsp;今天的任务 ([[today]])</div>
        <table class="table table-hover table-condensed">
          <thead>
              <tr>
                  <th>#</th><th>任务</th><th style="text-align:right;">重要性</th><th style="text-align:right;">操作</th>
              </tr>
          </thead>
          <tbody>
              <tr  ng-repeat="todo in todos" class="display-tr-[[todo.Isfinish]]">
                <td width="5%">[[todo.Id]]</td>
				<!--<td width="15%">[[todo.Starttime]]</td>-->
                <td width="40%">[[todo.Title]]</td>
				<td width="10%" style="text-align:right;">
					<span class="label [[Select2LabelClass(todo.Level)]]">[[Select2LabelText(todo.Level)]]</span>
				</td>
				<td style="text-align:right;">
					<button type="button" class="btn btn-success btn-sm display-btn-[[todo.Isfinish]]" ng-click="todoFinish(todo)">完成</button>
					<span class="label label-default display-label-[[todo.Isfinish]]">已完成</span>
				</td>
              </tr>
          </tbody>
          </table>
      </div>
       <!--明天有哪些要做的事
      <div id="tomo-todo" class="row-fluid">
       
		<table class="table table-hover table-condensed">
          <thead>
              <tr>
                  <th colspan="3" class="todo-show-header">2014-03-27</th>
              </tr>
          </thead>
          <tbody>
              <tr>
                  <td>1</td>
                  <td>Honda</td>
				<td>&nbsp;</td>
              </tr>
          </tbody>
          </table>
      </div>
      -->
	<!--昨天做了哪些要做的事-->
      <div id="yestoday-todo" class="row-fluid">
		<div class="todo-show-header">&nbsp;&nbsp;已完成任务（前七天）</div>
		<table class="table table-hover table-condensed">
          <thead>
              <tr>
                  <th>#</th><th>任务</th><th style="text-align:right;">重要性</th><th style="text-align:right;">起始时间</th><th style="text-align:right;">结束时间</th>
              </tr>
          </thead>
          <tbody>
              <tr ng-repeat="todo in ftodos" class="display-tr-1">
                <td width="5%">[[todo.Id]]</td>
                <td width="40%">[[todo.Title]]</td>
				<td style="text-align:right;">
					<span class="label [[Select2LabelClass(todo.Level)]]">[[Select2LabelText(todo.Level)]]</span>
				</td>
				<td style="text-align:right;">[[FormatTime(todo.Starttime)]]</td>
				<td style="text-align:right;">[[todo.Finishtime]]</td>
              </tr>
          </tbody>
          </table>
      </div>


	<input type="hidden" id="userid" name="userid" ng-model="userid" value="{{.Data.user.Id}}">
	
	</div>


 

{{template "jslib"}}
<script type="text/javascript" src="/public/js/todo.js"></script>
{{template "footer"}}